From: Thiemo Mättig Date: Wed, 9 Jul 2014 15:50:00 +0000 (+0200) Subject: Fix MediaWikiPageLinkRendererTest failing in non-English setups X-Git-Tag: 1.31.0-rc.0~15034^2 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=00aa6e46b519be018cba719279e9a5fbd0a79f9f;p=lhc%2Fweb%2Fwiklou.git Fix MediaWikiPageLinkRendererTest failing in non-English setups An other test that just assumes the testing environment is an English MediaWiki. A very easy and hopefully very obvious fix. This even restores the original content language. Change-Id: I1c303e0f42465a95540cc093a0ff4bfb0180c686 --- diff --git a/tests/phpunit/includes/title/MediaWikiPageLinkRendererTest.php b/tests/phpunit/includes/title/MediaWikiPageLinkRendererTest.php index 73d7ff9572..358b0fe2af 100644 --- a/tests/phpunit/includes/title/MediaWikiPageLinkRendererTest.php +++ b/tests/phpunit/includes/title/MediaWikiPageLinkRendererTest.php @@ -27,6 +27,14 @@ */ class MediaWikiPageLinkRendererTest extends MediaWikiTestCase { + protected function setUp() { + parent::setUp(); + + $this->setMwGlobals( array( + 'wgContLang' => Language::factory( 'en' ), + ) ); + } + /** * Returns a mock GenderCache that will return "female" always. *